﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CCWin;

namespace weiqijiance
{
    public partial class 稳态工况法自检 : CCSkinMain
    {
        public 稳态工况法自检()
        {
            InitializeComponent();
        }
        string[] sname1=new string[]{
"ACDT40",
"CCDT40",
"CDT40_Error",
"CDT40_Judge",
"ACDT25",
"CCDT25",
"CDT25_Error",
"CDT25_Judge",
"PLHP25",
"PLHP40",
"PressureGage_Judge"};
        string[] sname2=new string[]{
"Zero_HC",
"Zero_HC_Error",
"Zero_HC_Judge",
"Zero_CO",
"Zero_CO_Error",
"Zero_CO_Judge",
"Zero_NO",
"Zero_NO_Error",
"Zero_NO_Judge",
"Low_HC",
"Low_HC_Error",
"Low_HC_Judge",
"Low_CO",
"Low_CO_Error",
"Low_CO_Judge",
"Low_NO",
"Low_NO_Error",
"Low_NO_Judge",
"ML_HC",
"ML_HC_Error",
"ML_HC_Judge",
"ML_CO",
"ML_CO_Error",
"ML_CO_Judge",
"ML_NO",
"ML_NO_Error",
"ML_NO_Judge",
"Medium_HC",
"Medium_HC_Error",
"Medium_HC_Judge",
"Medium_CO",
"Medium_CO_Error",
"Medium_CO_Judge",
"Medium_NO",
"Medium_NO_Error",
"Medium_NO_Judge",
"MH_HC",
"MH_HC_Error",
"MH_HC_Judge",
"MH_CO",
"MH_CO_Error",
"MH_CO_Judge",
"MH_NO",
"MH_NO_Error",
"MH_NO_Judge",
"High_HC",
"High_HC_Error",
"High_HC_Judge",
"High_CO",
"High_CO_Error",
"High_CO_Judge",
"High_NO",
"High_NO_Error",
"High_NO_Judge"};
        string[] sname3 = new string[]{
"N1000",
"N1000_Error",
"N1000_Judge",
"N2000",
"N2000_Error",
"N2000_Judge",
"N3000",
"N3000_Error",
"N3000_Judge",
"N4000",
"N4000_Error",
"N4000_Judge",
"Judge"};
        string[] smc1=new string[]{
"实际滑行时间",
"计算滑行时间",
"相对误差",
"判定结果",
"实际滑行时间",
"计算滑行时间",
"相对误差",
"判定结果",
"名义速度为25km/h的寄生功率",
"名义速度为40km/h的寄生功率",
"底盘测功机压力计判定"};
        string[] smc2=new string[]{
"五气分析仪HC零气校准",
"HC零气误差率",
"HC自检校准判定",
"五气分析仪CO零气校准",
"CO零气误差率",
"CO自检校准判定",
"五气分析仪NO零气校准",
"NO零气误差率",
"NO自检校准判定",
"五气分析仪HC低量程校准",
"HC低量程误差率",
"HC自检校准判定",
"五气分析仪CO低量程校准",
"CO低量程误差率",
"CO自检校准判定",
"五气分析仪NO低量程校准",
"NO低量程误差率",
"NO自检校准判定",
"五气分析仪HC中低量程校准",
"HC中低量程误差率",
"HC自检校准判定",
"五气分析仪CO中低量程校准",
"CO中低量程误差率",
"CO自检校准判定",
"五气分析仪NO中低量程校准",
"NO中低量程误差率",
"NO自检校准判定",
"五气分析仪HC中量程校准",
"HC中量程误差率",
"HC自检校准判定",
"五气分析仪CO中量程校准",
"CO中量程误差率",
"CO自检校准判定",
"五气分析仪NO中量程校准",
"NO中量程误差率",
"NO自检校准判定",
"五气分析仪HC中高量程校准",
"HC中高量程误差率",
"HC自检校准判定",
"五气分析仪CO中高量程校准",
"CO中高量程误差率",
"CO自检校准判定",
"五气分析仪NO中高量程校准",
"NO中高量程误差率",
"NO自检校准判定",
"五气分析仪HC高量程校准",
"HC高量程误差率",
"HC自检校准判定",
"五气分析仪CO高量程校准",
"CO高量程误差率",
"CO自检校准判定",
"五气分析仪NO高量程校准",
"NO高量程误差率",
"NO自检校准判定"};
        string[] smc3 = new string[]{
"1000发动机转速传感器校准",
"1000发动机转速传感器校准误差率",
"1000发动机转速传感器校准判定",
"2000发动机转速传感器校准",
"2000发动机转速传感器校准误差率",
"2000发动机转速传感器校准判定",
"3000发动机转速传感器校准",
"3000发动机转速传感器校准误差率",
"3000发动机转速传感器校准判定",
"4000发动机转速传感器校准",
"4000发动机转速传感器校准误差率",
"4000发动机转速传感器校准判定",
"总自检判定"};

        public mainform m_mainform;
        private void 稳态工况法自检_Load(object sender, EventArgs e)
        {
            iniclass objini = new iniclass();
            string path = "";
            path = System.Windows.Forms.Application.StartupPath + "\\检测自检\\稳态工况设备自检信息.ini";
            string path1 = string.Format(@"{0}", path);
            objini.Ini(path1);

            for (int i = 0; i < smc1.Length; i++)
            {
                int index = this.dataGridView1.Rows.Add();
                this.dataGridView1.Rows[index].Cells[0].Value = smc1[i];
                this.dataGridView1.Rows[index].Cells[1].Value = objini.ReadValue("记录", sname1[i]).Trim();
            }
            for (int i = 0; i < smc2.Length; i++)
            {
                int index = this.dataGridView3.Rows.Add();
                this.dataGridView3.Rows[index].Cells[0].Value = smc2[i];
                this.dataGridView3.Rows[index].Cells[1].Value = objini.ReadValue("记录", sname2[i]).Trim();
            }
            for (int i = 0; i < smc3.Length; i++)
            {
                int index = this.dataGridView2.Rows.Add();
                this.dataGridView2.Rows[index].Cells[0].Value = smc3[i];
                this.dataGridView2.Rows[index].Cells[1].Value = objini.ReadValue("记录", sname3[i]).Trim();
            }

        }

        private void button1_Click(object sender, EventArgs e)
        {
            writeini();
            iniclass objini = new iniclass();
            string path = "";
            path = System.Windows.Forms.Application.StartupPath + "\\检测自检\\稳态工况设备自检信息.ini";
            string path1 = string.Format(@"{0}", path);
            objini.Ini(path1);
            model.尾气自检.检测前自检.ziasm objzj = new model.尾气自检.检测前自检.ziasm();
            objzj.bzjbz = true;
            objzj.StationCode = m_mainform.stationCode;
            objzj.SceneCode = m_mainform.lineCode;
            objzj.ACDT40 = objini.ReadValue("记录", "ACDT40").Trim();
            objzj.CCDT40 = objini.ReadValue("记录", "CCDT40").Trim();
            objzj.CDT40_Error = objini.ReadValue("记录", "CDT40_Error").Trim();
            objzj.CDT40_Judge = objini.ReadValue("记录", "CDT40_Judge").Trim();
            objzj.ACDT25 = objini.ReadValue("记录", "ACDT25").Trim();
            objzj.CCDT25 = objini.ReadValue("记录", "CCDT25").Trim();
            objzj.CDT25_Error = objini.ReadValue("记录", "CDT25_Error").Trim();
            objzj.CDT25_Judge = objini.ReadValue("记录", "CDT25_Judge").Trim();
            objzj.PLHP25 = objini.ReadValue("记录", "PLHP25").Trim();
            objzj.PLHP40 = objini.ReadValue("记录", "PLHP40").Trim();
            objzj.PressureGage_Judge = objini.ReadValue("记录", "PressureGage_Judge").Trim();
            objzj.Low_HC = objini.ReadValue("记录", "Low_HC").Trim();
            objzj.Low_HC_Error = objini.ReadValue("记录", "Low_HC_Error").Trim();
            objzj.Low_HC_Judge = objini.ReadValue("记录", "Low_HC_Judge").Trim();
            objzj.Low_CO = objini.ReadValue("记录", "Low_CO").Trim();
            objzj.Low_CO_Error = objini.ReadValue("记录", "Low_CO_Error").Trim();
            objzj.Low_CO_Judge = objini.ReadValue("记录", "Low_CO_Judge").Trim();
            objzj.Low_NO = objini.ReadValue("记录", "Low_NO").Trim();
            objzj.Low_NO_Error = objini.ReadValue("记录", "Low_NO_Error").Trim();
            objzj.Low_NO_Judge = objini.ReadValue("记录", "Low_NO_Judge").Trim();
            objzj.ML_HC = objini.ReadValue("记录", "ML_HC").Trim();
            objzj.ML_HC_Error = objini.ReadValue("记录", "ML_HC_Error").Trim();
            objzj.ML_HC_Judge = objini.ReadValue("记录", "ML_HC_Judge").Trim();
            objzj.ML_CO = objini.ReadValue("记录", "ML_CO").Trim();
            objzj.ML_CO_Error = objini.ReadValue("记录", "ML_CO_Error").Trim();
            objzj.ML_CO_Judge = objini.ReadValue("记录", "ML_CO_Judge").Trim();
            objzj.ML_NO = objini.ReadValue("记录", "ML_NO").Trim();
            objzj.ML_NO_Error = objini.ReadValue("记录", "ML_NO_Error").Trim();
            objzj.ML_NO_Judge = objini.ReadValue("记录", "ML_NO_Judge").Trim();
            objzj.Medium_HC = objini.ReadValue("记录", "Medium_HC").Trim();
            objzj.Medium_HC_Error = objini.ReadValue("记录", "Medium_HC_Error").Trim();
            objzj.Medium_HC_Judge = objini.ReadValue("记录", "Medium_HC_Judge").Trim();
            objzj.Medium_CO = objini.ReadValue("记录", "Medium_CO").Trim();
            objzj.Medium_CO_Error = objini.ReadValue("记录", "Medium_CO_Error").Trim();
            objzj.Medium_CO_Judge = objini.ReadValue("记录", "Medium_CO_Judge").Trim();
            objzj.Medium_NO = objini.ReadValue("记录", "Medium_NO").Trim();
            objzj.Medium_NO_Error = objini.ReadValue("记录", "Medium_NO_Error").Trim();
            objzj.Medium_NO_Judge = objini.ReadValue("记录", "Medium_NO_Judge").Trim();
            objzj.MH_HC = objini.ReadValue("记录", "MH_HC").Trim();
            objzj.MH_HC_Error = objini.ReadValue("记录", "MH_HC_Error").Trim();
            objzj.MH_HC_Judge = objini.ReadValue("记录", "MH_HC_Judge").Trim();
            objzj.MH_CO = objini.ReadValue("记录", "MH_CO").Trim();
            objzj.MH_CO_Error = objini.ReadValue("记录", "MH_CO_Error").Trim();
            objzj.MH_CO_Judge = objini.ReadValue("记录", "MH_CO_Judge").Trim();
            objzj.MH_NO = objini.ReadValue("记录", "MH_NO").Trim();
            objzj.MH_NO_Error = objini.ReadValue("记录", "MH_NO_Error").Trim();
            objzj.MH_NO_Judge = objini.ReadValue("记录", "MH_NO_Judge").Trim();
            objzj.High_HC = objini.ReadValue("记录", "High_HC").Trim();
            objzj.High_HC_Error = objini.ReadValue("记录", "High_HC_Error").Trim();
            objzj.High_HC_Judge = objini.ReadValue("记录", "High_HC_Judge").Trim();
            objzj.High_CO = objini.ReadValue("记录", "High_CO").Trim();
            objzj.High_CO_Error = objini.ReadValue("记录", "High_CO_Error").Trim();
            objzj.High_CO_Judge = objini.ReadValue("记录", "High_CO_Judge").Trim();
            objzj.High_NO = objini.ReadValue("记录", "High_NO").Trim();
            objzj.High_NO_Error = objini.ReadValue("记录", "High_NO_Error").Trim();
            objzj.High_NO_Judge = objini.ReadValue("记录", "High_NO_Judge").Trim();
            objzj.N1000 = objini.ReadValue("记录", "N1000").Trim();
            objzj.N1000_Error = objini.ReadValue("记录", "N1000_Error").Trim();
            objzj.N1000_Judge = objini.ReadValue("记录", "N1000_Judge").Trim();
            objzj.N2000 = objini.ReadValue("记录", "N2000").Trim();
            objzj.N2000_Error = objini.ReadValue("记录", "N2000_Error").Trim();
            objzj.N2000_Judge = objini.ReadValue("记录", "N2000_Judge").Trim();
            objzj.N3000 = objini.ReadValue("记录", "N3000").Trim();
            objzj.N3000_Error = objini.ReadValue("记录", "N3000_Error").Trim();
            objzj.N3000_Judge = objini.ReadValue("记录", "N3000_Judge").Trim();
            objzj.N4000 = objini.ReadValue("记录", "N4000").Trim();
            objzj.N4000_Error = objini.ReadValue("记录", "N4000_Error").Trim();
            objzj.N4000_Judge = objini.ReadValue("记录", "N4000_Judge").Trim();
            objzj.Judge = objini.ReadValue("记录", "Judge").Trim();
            //objzj.CheckTimeStart = objini.ReadValue("记录", "CheckTimeStart").Trim();
            //objzj.CheckTimeEnd = objini.ReadValue("记录", "CheckTimeEnd").Trim();
            objzj.Zero_HC = objini.ReadValue("记录", "Zero_HC").Trim();
            objzj.Zero_HC_Error = objini.ReadValue("记录", "Zero_HC_Error").Trim();
            objzj.Zero_HC_Judge = objini.ReadValue("记录", "Zero_HC_Judge").Trim();
            objzj.Zero_CO = objini.ReadValue("记录", "Zero_CO").Trim();
            objzj.Zero_CO_Error = objini.ReadValue("记录", "Zero_CO_Error").Trim();
            objzj.Zero_CO_Judge = objini.ReadValue("记录", "Zero_CO_Judge").Trim();
            objzj.Zero_NO = objini.ReadValue("记录", "Zero_NO").Trim();
            objzj.Zero_NO_Error = objini.ReadValue("记录", "Zero_NO_Error").Trim();
            objzj.Zero_NO_Judge = objini.ReadValue("记录", "Zero_NO_Judge").Trim();
            objzj.CheckTimeStart = DateTime.Now.ToString("yyyy-MM-dd") + " " + dateTimePicker1.Value.ToString("HH:mm:ss");
            objzj.CheckTimeEnd = DateTime.Now.ToString("yyyy-MM-dd") + " " + dateTimePicker2.Value.ToString("HH:mm:ss");


            MessageBox.Show(m_mainform.objbass.jianceqianzj("", objzj));
        }

        private void button2_Click(object sender, EventArgs e)
        {

            writeini();
            iniclass objini = new iniclass();
            string path = "";
            path = System.Windows.Forms.Application.StartupPath + "\\检测自检\\稳态工况设备自检信息.ini";
            string path1 = string.Format(@"{0}", path);
            objini.Ini(path1);
            model.尾气自检.检测前自检.zijiansds objzj = new model.尾气自检.检测前自检.zijiansds();
            objzj.bzjbz = true;
            objzj.bzjbz = true; 
            objzj.StationCode = m_mainform.stationCode;
            objzj.SceneCode = m_mainform.lineCode;
            objzj.Low_HC = objini.ReadValue("记录", "Low_HC").Trim();
            objzj.Low_HC_Error = objini.ReadValue("记录", "Low_HC_Error").Trim();
            objzj.Low_HC_Judge = objini.ReadValue("记录", "Low_HC_Judge").Trim();
            objzj.Low_CO = objini.ReadValue("记录", "Low_CO").Trim();
            objzj.Low_CO_Error = objini.ReadValue("记录", "Low_CO_Error").Trim();
            objzj.Low_CO_Judge = objini.ReadValue("记录", "Low_CO_Judge").Trim();
            objzj.ML_HC = objini.ReadValue("记录", "ML_HC").Trim();
            objzj.ML_HC_Error = objini.ReadValue("记录", "ML_HC_Error").Trim();
            objzj.ML_HC_Judge = objini.ReadValue("记录", "ML_HC_Judge").Trim();
            objzj.ML_CO = objini.ReadValue("记录", "ML_CO").Trim();
            objzj.ML_CO_Error = objini.ReadValue("记录", "ML_CO_Error").Trim();
            objzj.ML_CO_Judge = objini.ReadValue("记录", "ML_CO_Judge").Trim();
            objzj.Medium_HC = objini.ReadValue("记录", "Medium_HC").Trim();
            objzj.Medium_HC_Error = objini.ReadValue("记录", "Medium_HC_Error").Trim();
            objzj.Medium_HC_Judge = objini.ReadValue("记录", "Medium_HC_Judge").Trim();
            objzj.Medium_CO = objini.ReadValue("记录", "Medium_CO").Trim();
            objzj.Medium_CO_Error = objini.ReadValue("记录", "Medium_CO_Error").Trim();
            objzj.Medium_CO_Judge = objini.ReadValue("记录", "Medium_CO_Judge").Trim();
            objzj.MH_HC = objini.ReadValue("记录", "MH_HC").Trim();
            objzj.MH_HC_Error = objini.ReadValue("记录", "MH_HC_Error").Trim();
            objzj.MH_HC_Judge = objini.ReadValue("记录", "MH_HC_Judge").Trim();
            objzj.MH_CO = objini.ReadValue("记录", "MH_CO").Trim();
            objzj.MH_CO_Error = objini.ReadValue("记录", "MH_CO_Error").Trim();
            objzj.MH_CO_Judge = objini.ReadValue("记录", "MH_CO_Judge").Trim();
            objzj.High_HC = objini.ReadValue("记录", "High_HC").Trim();
            objzj.High_HC_Error = objini.ReadValue("记录", "High_HC_Error").Trim();
            objzj.High_HC_Judge = objini.ReadValue("记录", "High_HC_Judge").Trim();
            objzj.High_CO = objini.ReadValue("记录", "High_CO").Trim();
            objzj.High_CO_Error = objini.ReadValue("记录", "High_CO_Error").Trim();
            objzj.High_CO_Judge = objini.ReadValue("记录", "High_CO_Judge").Trim();
            objzj.N1000 = objini.ReadValue("记录", "N1000").Trim();
            objzj.N1000_Error = objini.ReadValue("记录", "N1000_Error").Trim();
            objzj.N1000_Judge = objini.ReadValue("记录", "N1000_Judge").Trim();
            objzj.N2000 = objini.ReadValue("记录", "N2000").Trim();
            objzj.N2000_Error = objini.ReadValue("记录", "N2000_Error").Trim();
            objzj.N2000_Judge = objini.ReadValue("记录", "N2000_Judge").Trim();
            objzj.N3000 = objini.ReadValue("记录", "N3000").Trim();
            objzj.N3000_Error = objini.ReadValue("记录", "N3000_Error").Trim();
            objzj.N3000_Judge = objini.ReadValue("记录", "N3000_Judge").Trim();
            objzj.N4000 = objini.ReadValue("记录", "N4000").Trim();
            objzj.N4000_Error = objini.ReadValue("记录", "N4000_Error").Trim();
            objzj.N4000_Judge = objini.ReadValue("记录", "N4000_Judge").Trim();
            objzj.Judge = objini.ReadValue("记录", "Judge").Trim();
            //objzj.CheckTimeStart = objini.ReadValue("记录", "CheckTimeStart").Trim();
            //objzj.CheckTimeEnd = objini.ReadValue("记录", "CheckTimeEnd").Trim();
            objzj.Zero_HC = objini.ReadValue("记录", "Zero_HC").Trim();
            objzj.Zero_HC_Error = objini.ReadValue("记录", "Zero_HC_Error").Trim();
            objzj.Zero_HC_Judge = objini.ReadValue("记录", "Zero_HC_Judge").Trim();
            objzj.Zero_CO = objini.ReadValue("记录", "Zero_CO").Trim();
            objzj.Zero_CO_Error = objini.ReadValue("记录", "Zero_CO_Error").Trim();
            objzj.Zero_CO_Judge = objini.ReadValue("记录", "Zero_CO_Judge").Trim();
            objzj.CheckTimeStart = DateTime.Now.ToString("yyyy-MM-dd") + " " + dateTimePicker1.Value.ToString("HH:mm:ss");
            objzj.CheckTimeEnd = DateTime.Now.ToString("yyyy-MM-dd") + " " + dateTimePicker2.Value.ToString("HH:mm:ss");

            MessageBox.Show(m_mainform.objbass.jianceqianzj("", objzj));

        }

        public void writeini()
        {
            iniclass objini = new iniclass();
            string path = "";
            path = System.Windows.Forms.Application.StartupPath + "\\检测自检\\稳态工况设备自检信息.ini";
            string path1 = string.Format(@"{0}", path);
            objini.Ini(path1);

            for (int i = 0; i < smc1.Length; i++)
            {
                objini.Writue("记录", sname1[i],Convert.ToString( this.dataGridView1.Rows[i].Cells[1].Value));
            }
            for (int i = 0; i < smc2.Length; i++)
            {
                objini.Writue("记录", sname2[i],Convert.ToString( this.dataGridView3.Rows[i].Cells[1].Value));
            }
            for (int i = 0; i < smc3.Length; i++)
            {
                objini.Writue("记录", sname3[i],Convert.ToString( this.dataGridView2.Rows[i].Cells[1].Value));
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {

            #region 转速
            {
                double[] flc = new double[4];
                flc[0] = ((float)m_mainform.getRandom(0, 87)) +  960;
                flc[1] = ((float)m_mainform.getRandom(0, 87)) + 1960;
                flc[2] = ((float)m_mainform.getRandom(0, 87)) + 2960;
                flc[3] = ((float)m_mainform.getRandom(0, 87)) + 3960;
                double[] fwc = new double[4];
                fwc[0] = Math.Round(Math.Abs(1000 - flc[0]) / 1000*100, 2);
                fwc[1] = Math.Round(Math.Abs(2000 - flc[1]) / 2000*100, 2);
                fwc[2] = Math.Round(Math.Abs(3000 - flc[2]) / 3000*100, 2);
                fwc[3] = Math.Round(Math.Abs(4000 - flc[3]) / 4000*100, 2);

                dataGridView2.Rows[0].Cells[1].Value = flc[0].ToString();
                dataGridView2.Rows[1].Cells[1].Value = fwc[0].ToString();
                dataGridView2.Rows[2].Cells[1].Value = "1";

                dataGridView2.Rows[3].Cells[1].Value = flc[1].ToString();
                dataGridView2.Rows[4].Cells[1].Value = fwc[1].ToString();
                dataGridView2.Rows[5].Cells[1].Value = "1";

                dataGridView2.Rows[6].Cells[1].Value = flc[2].ToString();
                dataGridView2.Rows[7].Cells[1].Value = fwc[2].ToString();
                dataGridView2.Rows[8].Cells[1].Value = "1";

                dataGridView2.Rows[9].Cells[1].Value = flc[3].ToString();
                dataGridView2.Rows[10].Cells[1].Value = fwc[3].ToString();
                dataGridView2.Rows[11].Cells[1].Value = "1";

                dataGridView2.Rows[12].Cells[1].Value = "1";

            }
            #endregion
        }

        private void button4_Click(object sender, EventArgs e)
        {

            #region 转速
            {

//Zero_HC
//Zero_HC_Error
//Zero_HC_Judge
//Zero_CO
//Zero_CO_Error
//Zero_CO_Judge
//Zero_NO
//Zero_NO_Error
//Zero_NO_Judge
//Low_HC
//Low_HC_Error
//Low_HC_Judge
//Low_CO
//Low_CO_Error
//Low_CO_Judge
//Low_NO
//Low_NO_Error
//Low_NO_Judge
//ML_HC
//ML_HC_Error
//ML_HC_Judge
//ML_CO
//ML_CO_Error
//ML_CO_Judge
//ML_NO
//ML_NO_Error
//ML_NO_Judge
//Medium_HC
//Medium_HC_Error
//Medium_HC_Judge
//Medium_CO
//Medium_CO_Error
//Medium_CO_Judge
//Medium_NO
//Medium_NO_Error
//Medium_NO_Judge
//MH_HC
//MH_HC_Error
//MH_HC_Judge
//MH_CO
//MH_CO_Error
//MH_CO_Judge
//MH_NO
//MH_NO_Error
//MH_NO_Judge
//High_HC
//High_HC_Error
//High_HC_Judge
//High_CO
//High_CO_Error
//High_CO_Judge
//High_NO
//High_NO_Error
//High_NO_Judge

                //double[] flc = new double[4];
                //flc[0] = ((float)m_mainform.getRandom(0, 14)) + 990;
                //flc[1] = ((float)m_mainform.getRandom(0, 14)) + 1990;
                //flc[2] = ((float)m_mainform.getRandom(0, 14)) + 2990;
                //flc[3] = ((float)m_mainform.getRandom(0, 14)) + 3990;
                //double[] fwc = new double[4];
                //fwc[0] = Math.Round(Math.Abs(1000 - flc[0]) / 1000, 2);
                //fwc[1] = Math.Round(Math.Abs(2000 - flc[2]) / 2000, 2);
                //fwc[2] = Math.Round(Math.Abs(3000 - flc[3]) / 3000, 2);
                //fwc[3] = Math.Round(Math.Abs(4000 - flc[4]) / 4000, 2);

                //dataGridView2.Rows[0].Cells[1].Value = flc[0].ToString();
                //dataGridView2.Rows[1].Cells[1].Value = fwc[0].ToString();
                //dataGridView2.Rows[2].Cells[1].Value = "1";

                //dataGridView2.Rows[3].Cells[1].Value = flc[1].ToString();
                //dataGridView2.Rows[4].Cells[1].Value = fwc[1].ToString();
                //dataGridView2.Rows[5].Cells[1].Value = "1";

                //dataGridView2.Rows[6].Cells[1].Value = flc[2].ToString();
                //dataGridView2.Rows[7].Cells[1].Value = fwc[2].ToString();
                //dataGridView2.Rows[8].Cells[1].Value = "1";

                //dataGridView2.Rows[9].Cells[1].Value = flc[3].ToString();
                //dataGridView2.Rows[10].Cells[1].Value = fwc[3].ToString();
                //dataGridView2.Rows[11].Cells[1].Value = "1";

                //dataGridView2.Rows[12].Cells[1].Value = "1";

            }
            #endregion
        }
    }
}
